Skip to content

Update @metamask/eth-keyring-controller#1441

Merged
mikesposito merged 19 commits into
mainfrom
chore/update-eth-keyring-controller
Jul 18, 2023
Merged

Update @metamask/eth-keyring-controller#1441
mikesposito merged 19 commits into
mainfrom
chore/update-eth-keyring-controller

Conversation

@mikesposito
Copy link
Copy Markdown
Member

@mikesposito mikesposito commented Jun 21, 2023

Explanation

This PR updates @metamask/eth-keyring-controller in KeyringController to ^13.
As after v11.0.0 the library has been migrated to TS there is a number of changes needed to support it.

  • Type guards have been added to mitigate some issues with the Keyring type used by @metamask/eth-keyring-controller, which is still not supported by the latest released versions of the HD and simple keyrings.
  • Keyring type from @metamask/utils has been added, superseding local type declarations

References

Changelog

@metamask/keyring-controller

  • BREAKING: Removed keyringTypes property from the KeyringController state
  • BREAKING: Constructor KeyringControllerOptions type changed
    • The KeyringControllerOptions.state accepted type is now { vault?: string }
    • The KeyringControllerOptions.keyringBuilders type is now { (): Keyring<Json>; type: string }[]
  • BREAKING: The address type accepted by the removeAccount method is now Hex
  • BREAKING: The signTypedMessage method now returns a Promise<string>
  • BREAKING: The signTransaction method now requires a TypedTransaction from @ethereumjs/tx@^4 for the transaction argument, and returns a Promise<TxData>
  • BREAKING: Rename Keyring type to KeyringObject
  • BREAKING: addNewAccount now throws if address of new account is not a hex string
  • BREAKING: exportSeedPhrase now throws if first keyring does not have a mnemonic
  • BREAKING: verifySeedPhrase now throws if HD keyring does not have a mnemonic
  • CHANGED: Update return type of getAccountKeyringType to Promise<string>
  • CHANGED: The private method addQRKeyring has been renamed to #addQRKeyring
  • CHANGED: Updated @metamask/eth-keyring-controller to ^13.0.0

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants